#include <stdio.h>
int main()
{
	int n;
    scanf("%d",&n);
    int four=1,three=0,two=0,one=0;
    for(int i=0;i<=n;i++){
        int t=four;
        four+=three;
        three=two;
        two=one;
        one=t;
    }
    printf("%d\n",four+three+two+one);
    return 0;
}
